CC = gcc
OBJS = main.o machine.o diagram.o graphics.o
CFLAGS = -lncurses

AS: $(OBJS)
	$(CC) $^ $(CFLAGS) -o $@

main.o: main.c
	$(CC) -c $(CFLAGS) $^

machine.o: machine.c
	$(CC) -c $(CFLAGS) $^

diagram.o: diagram.c
	$(CC) -c $(CFLAGS) $^

graphics.o: graphics.c
	$(CC) -c $(CFLAGS) $^

.PHONY: all run clean
	
clean:
	rm -f *.o *~
